package com.tma.umedia;

import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;

public class Song implements Parcelable {
	private String Title, Artist, Duration, Path;
	private Drawable Thumb;
	static String TAG = "Media";
	
	public Song(){
		this.Title = "Untitled";
		this.Artist = "Unknown";
		this.Duration = "--:--";
		this.Path = "Unknown";
	}
	
	public Song(Parcel in)
	{
        this.Title = in.readString ();
        this.Artist = in.readString ();
        this.Duration = in.readString ();
        this.Path = in.readString ();
	}
	
	public Song(String Title, String Artist, String Duration, String Path){
		this.Title = Title;
		this.Artist = Artist;
		this.Duration = Duration;
		this.Path = Path;
	}
	
	public String getTitle(){
		return this.Title;
	}
	
	public void setTitle(String _Title){
		this.Title = _Title;
	}
	
	public String getArtist(){
		return this.Artist;
	}
	
	public void setArtist(String _Artist){
		this.Artist = _Artist;
	}
	
	public String getDuration(){
		return this.Duration;
	}
	
	public void setDuration(String _Duration){
		this.Duration = _Duration;
	}
	
	public String getPath(){
		return this.Path;
	}
	
	public void setPath(String _Path){
		this.Path = _Path;
	}
	
	public Drawable getThumb(){
		return this.Thumb;
	}
	
	public void setThumb(Drawable _Thumb){
		this.Thumb = _Thumb;
	}
	
	public static final Parcelable.Creator<Song> CREATOR
    = new Parcelable.Creator<Song>() 
    {
         public Song createFromParcel(Parcel in) 
         {
             return new Song(in);
         }

         public Song[] newArray (int size) 
         {
             return new Song[size];
         }
    };
    
	@Override
	public int describeContents ()
	{
        return 0;
	}

    @Override
    public void writeToParcel (Parcel dest, int flags)
    {
        dest.writeString(this.Title);
       	dest.writeString(this.Artist);
       	dest.writeString(this.Duration);
       	dest.writeString(this.Path);
    }
}
